<template>
  <div>
    <el-table
        :data="list"
        border
        stripe
        style="width: 100%">
      <!--网址名称-->
      <!--prop="title"循环数组的一项-->
      <el-table-column
          align="center"
          label="创建时间"
          width="220">
        <template slot-scope="scope">
          <i class="el-icon-time"></i>
          <span style="margin-left: 10px">{{ scope.row.createTime}}</span>
        </template>
      </el-table-column>
      <!--网址url-->
      <el-table-column
          label="兑换时间"
          align="center"
          width="220">
        <template slot-scope="scope">
          <i class="el-icon-time"></i>
          <span style="margin-left: 10px">{{ scope.row.updateTime}}</span>
        </template>
      </el-table-column>

      <el-table-column
          label="订单编号"
          align="center"
          width="220">
        <template slot-scope="scope">
          <span style="margin-left: 10px">{{ scope.row.orderNum}}</span>
        </template>
      </el-table-column>

      <el-table-column
          label="商品名称"
          align="center"
          width="220">
        <template slot-scope="scope">
          <span style="margin-left: 10px">{{ scope.row.goods.goodsName}}</span>
        </template>
      </el-table-column>

      <el-table-column
          label="用户凭证"
          align="center"
      >
        <template slot-scope="scope">
          <span style="margin-left: 10px">{{ scope.row.openid}}</span>
        </template>
      </el-table-column>
      <!--      &lt;!&ndash;   操作 删除&ndash;&gt;-->
      <!--      <el-table-column align="center" label="操作">-->
      <!--        <template slot-scope="scope">-->
      <!--          <el-button-->
      <!--              size="mini"-->
      <!--              type="danger"-->
      <!--              @click="handleDelete(scope.row.id)">删除-->
      <!--          </el-button>-->
      <!--        </template>-->
      <!--      </el-table-column>-->
    </el-table>
  </div>
</template>

<script>
  export default {
    name: "endmyorder",
    data() {
      return {
        list: []
      }
    },

    methods: {
      getlist() {//获取数据
        this.axios.post(this.API.API1 + '/getAllOrder', {state: 1}, {
          headers: {
            'Authorization': 'XIEGE ' + this.API.token,
            'Content-Type': 'application/json;charset=UTF-8'
          }
        }).then(res => {
          console.log(res)

          this.list = res.data
        })

      },

    },
    created() {
      this.getlist()
    },

  }
</script>

<style scoped>


</style>